package com.qingzhou.log.service.impl;

import com.qingzhou.log.dao.SysLogDao;
import com.qingzhou.log.pojo.SysLog;
import com.qingzhou.log.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huoming
 * @note service实现类
 * @introduce 负责组织数据库的原子操作、业务逻辑的主要类
 * */
@RestController
public class SysLogServiceImpl implements SysLogService {

    @Autowired
    protected SysLogDao sysLogDao;

    /**
     * 写入数据库
     * */
    @RequestMapping("/writeLog")
    public void writeLog(@RequestBody SysLog sysLog) {
        sysLogDao.insert(sysLog);
    }
}
